﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;

namespace DAL
{
    class StudentDLL
    {
        string sql = ConfigurationManager.ConnectionStrings["SQLConnectionString"].ToString();

             SqlConnection myconn=new SqlConnection(sql);­

             myconn.Open();­

             SqlCommand cmd=new SqlCommand("insert into dbo.[user]([name]) values(@name)",myconn);­

             cmd.Parameters.AddWithValue("@name", model.name);­

             if (cmd.ExecuteNonQuery()>0)­

             {­

                 return true;­

             }­

             else­

             {­

                 return false;­

             }­


    }
}
